<h1>Listing questions</h1>

<table>
  <thead>
    <tr>
      <th>Question</th>
      <th>Node</th>
      <th>Phasetype</th>
      <th>Resolved</th>
      <th colspan="3"></th>
    </tr>
  </thead>

  <tbody>
    <% @questions.each do |question| %>
      <tr>
        <td><%= question.question %></td>
        <td><%= question.node.name %></td>
        <td><%= question.phaseType.name %></td>
        <td><%= question.resolved_id %></td>
        <td><%= link_to 'Show', question %></td>
        <td><%= link_to 'Edit', edit_question_path(question) %></td>
        <td><%= link_to 'Destroy', question, method: :delete, data: { confirm: 'Are you sure?' } %></td>
      </tr>
    <% end %>
  </tbody>
</table>

<br>

<%= link_to 'New Question', new_question_path %>
